﻿using System;
using System.Collections.Generic;
using Newtonsoft.Json;

namespace Import_glTF.gltf
{
    // appended to nodes
    internal class ExtStructuralMetadata
    {
        [JsonProperty("class")]
        public string Class;

        [JsonProperty("properties")]
        public Dictionary<string, object> properties;

        public void AddProperty(string key, object value)
        {
            properties = properties ?? new Dictionary<string, object>();
            properties.Add(key, value);
        }

        public bool HasProperty(string key)
        {
            if (properties == null) return false;

            return properties.ContainsKey(key);
        }
    }
}
